package com.company;

public class StringDome {
    public static void main(String[] args){
//        String str="菜鸟";
//        System.out.println(str);

//        char[] str={'a','b','c'};
//        String strD=new String(str);
//        System.out.println(strD.length());

       String str="abcdeafgahaj";
       String str1="a";
       String str2="ABc";
       String str3="abc";
       char[] str4={'a','b','c','d','e','f','g'};
        String str5="       www.baidu,com     ";
        String str6="hello-word!";


//        System.out.println(str.charAt(0));

//        System.out.println(str.compareTo(str1));

//        System.out.println(str.compareToIgnoreCase(str2));

//        System.out.println(str.contentEquals(str3));

//        System.out.println(str.copyValueOf(str4));
//        System.out.println(str1.copyValueOf(str4,2,4));

//        System.out.println(str.endsWith("j"));
//        System.out.println(str.startsWith("a"));

//        for (String res: str6.split("-")) {
//             System.out.println(res);
//        }

//        System.out.println(str.replaceFirst("a","A"));
//        System.out.println(str.replaceAll("a","A"));
//        System.out.println(str.replace("a","A"));


//          System.out.println(str5.trim());

//        System.out.println(str5.trim().toCharArray());

//         System.out.println(str.substring(2));
//         System.out.println(str.substring(1,5));

    }
}
